<template>
  <div class="mod-config">
    <el-form >
      <el-form-item>
<!--        <el-input v-model="dataForm" placeholder="参数名" clearable></el-input>-->
      </el-form-item>
      <el-form-item>
<!--        <el-button @click="getDataList()">查询</el-button>-->

      </el-form-item>
    </el-form>







<!--    <table>-->


<!--      <tr>-->

<!--        <td>id</td>-->
<!--        <td>AreaEn</td>-->
<!--        <td>Area</td>-->
<!--        <td>Line</td>-->
<!--        <td>LineEN</td>-->
<!--        <td>EquipmentName</td>-->
<!--        <td>WorkCenter</td>-->
<!--        <td>EquipmentComposition</td>-->
<!--        <td>Specification</td>-->
<!--        <td>Usage</td>-->

<!--        <td>InterfaceParameters</td>-->


<!--      </tr>-->
<!--      <tr v-for="item in dataList">-->

<!--        <td>{{item.id}}}</td>-->
<!--        <td>{{item.areaEn}}}</td>-->
<!--        <td>{{item.line}}}</td>-->
<!--        <td>{{item.interfaceParameters}}}</td>-->
<!--        <td>{{item.equipmentComposition}}}</td>-->
<!--        <td>{{item.area}}}</td>-->
<!--        <td>{{item.equipmentName}}}</td>-->
<!--        <td>{{item.specification}}}</td>-->
<!--        <td>{{item.workCenter}}}</td>-->
<!--        <td>{{item.lineEn}}}</td>-->
<!--        <td>{{item.usage}}}</td>-->


<!--      </tr>-->




<!--    </table>-->













    <el-table :data="dataList" border style="width: 100%">





      <el-table-column prop="id" label="id" width="120">//prop里的值是数据库表里的对应字段名

      </el-table-column>

      <el-table-column prop="areaEn" label="AreaE" width="120">

      </el-table-column>

      <el-table-column prop="area" label="Area" width="120">

      </el-table-column>

      <el-table-column prop="line" label="Line">

      </el-table-column>
      <el-table-column prop="lineEN" label="LineEN">

      </el-table-column>
      <el-table-column prop="equipmentName" label="EquipmentName">

      </el-table-column>
      <el-table-column prop="workCenter" label="WorkCenter">

      </el-table-column>
      <el-table-column prop="equipmentComposition" label="EquipmentComposition">

      </el-table-column>
      <el-table-column prop="specification" label="Specification">

      </el-table-column>
      <el-table-column prop="usage" label="Usage">

      </el-table-column>
      <el-table-column prop="interfaceParameters" label="InterfaceParameters">

      </el-table-column>

    </el-table>
<!--    <el-pagination-->
<!--      @size-change="sizeChangeHandle"-->
<!--      @current-change="currentChangeHandle"-->
<!--      :current-page="pageIndex"-->
<!--      :page-sizes="[10, 20, 50, 100]"-->
<!--      :page-size="pageSize"-->
<!--      :total="totalPage"-->
<!--      layout="total, sizes, prev, pager, next, jumper">-->
<!--    </el-pagination>-->
    <!-- 弹窗, 新增 / 修改 -->
<!--    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>-->
  </div>
</template>

<script>
  // import AddOrUpdate from './devicelist-add-or-update'
  export default {
    data () {
      return {
        dataList: [
        ]
        // pageIndex: 1,
        // pageSize: 100,
        // totalPage: 0,
        // dataListLoading: false,
        // dataListSelections: [],
        // addOrUpdateVisible: false
      }
    },
    activated () {
      this.getDataList()
    },
    methods: {
      // 获取数据列表
      getDataList () {
        this.dataListLoading = true
        this.$http({
          url: this.$http.adornUrl('/generator/devicelist/sys/listt'),
          method: 'get'
        }).then(({data}) => {
          if (data && data) {
            this.dataList = data
            this.totalPage = data.page
            console.log(this.totalPage)
          } else {
            this.dataList = []
            this.totalPage = 0
          }
          this.dataListLoading = false
        })
      }
      // 每页数
    }
  }
</script>
